package Test;

import Global.ConstantVariable;
import Global.ConstantVariable.FEATURE_ENRICHMENT_PROPERTIES;
import Sampling.SamplingException;

public class TestParameterManager {

	// Dosyadan paramete okuma yaparak oluştur.... Dynamic olarak....
	
	public static Object[] getSamplingParametres(String samplingName) {

		Object[] args = null;
		
		if(samplingName == ConstantVariable.Sampling_Constants.SNOWBALL_SAMPLING_METHOD) {
			args = new Object[4];
			
			args[0] = 0.9;
			args[1] = 0.0;
			args[2] = 0.0; 
			args[3] = 0.1;
		
		} else if (samplingName == ConstantVariable.Sampling_Constants.RANDOM_SAMPLING_METHOD)  {
			args = new Object[4];
			/*
			 * 	Random Sampling
			 *	Parametre 1: Name 
			 *	Parametre 2: TestRatio
			 *	Parametre 3: ValRatio
			 *	Parametre 4: Size
			 * */
			args[0] = 0.9;
			args[1] = 0.0;
			args[2] = 0.0;
			args[3] = 0.1;

			
		} else {
			throw new SamplingException("Parametreleri hatalı verdiniz.");
		}
	
		return args;
	}
	
	
	//TODO(KADRIYEB)  This method now implemented statically but it must be change.
	
	public static Object[] getTestParameters() {
		
		Object[] args = new Object[4];

		args[0] = getTestParametresOfM();
		args[1] = getFeatureEnrichmentParametres();
		args[2] = getTestParametresOfK();
		
		args[3] = ConstantVariable.Sampling_Constants.RANDOM_SAMPLING_METHOD;
		return args;
	}
	
	private static int[] getTestParametresOfK() {
		int[] kParams = new int[3];
		
		kParams[0] = 5;
//		kParams[2] = 10;
//		kParams[1] = 25;
		return kParams;
	}

	
	private static int[] getTestParametresOfM() {
		int[] mParams = new int[2];
		
		mParams[1] = 25;
//		mParams[0] = 50;
		return mParams;
	}
	
	private static String[] getFeatureEnrichmentParametres() {
		
		String[] testParams = new String[1];
		
		testParams[0] = FEATURE_ENRICHMENT_PROPERTIES.OR;
//		testParams[1] = FEATURE_ENRICHMENT_PROPERTIES.PLAIN_COUNT_OR;
//		testParams[0] = FEATURE_ENRICHMENT_PROPERTIES.PLAIN;
//		testParams[3] = FEATURE_ENRICHMENT_PROPERTIES.COUNT;
		return testParams;
	}
}
